package com.ac.input.dm;

import com.caac.core.dm.BaseDm;

import java.util.List;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright 2004</p>
 * <p>Company: </p>
 * @author <a href="mailto:lianzs@agilecentury.com">lianzs</a>
 * @version 1.0
 */

public class HndInpDefItm extends BaseDm {
    private String id;
    private String inpCode;
    private String colCode;
    private String colName;
    private Double colLen;
    private String colTyp;
    private String visTyp;
    private Integer visNo;
    private String ordTyp;
    private Integer ordNo;
    private String isVisible;
    private String isKey;
    private String isQuery;
    private String isInput;
    private String isNeed;
    private String isOrgId;
    private String listSql;
    private String chkRule;
    private String dftValue;

    private Object oldValue;
    private List listData;

    public String getInpCode() {
        return this.inpCode;
    }

    public void setInpCode(String inpCode) {
        this.inpCode = inpCode;
    }

    public String getColCode() {
        return this.colCode;
    }

    public void setColCode(String colCode) {
        this.colCode = colCode;
    }

    public String getColName() {
        return this.colName;
    }

    public void setColName(String colName) {
        this.colName = colName;
    }

    public Double getColLen() {
        return this.colLen;
    }

    public void setColLen(Double colLen) {
        this.colLen = colLen;
    }

    public String getColTyp() {
        return this.colTyp;
    }

    public void setColTyp(String colTyp) {
        this.colTyp = colTyp;
    }

    public String getVisTyp() {
        return this.visTyp;
    }

    public void setVisTyp(String visTyp) {
        this.visTyp = visTyp;
    }

    public Integer getVisNo() {
        return this.visNo;
    }

    public void setVisNo(Integer visNo) {
        this.visNo = visNo;
    }

    public String getOrdTyp() {
        return this.ordTyp;
    }

    public void setOrdTyp(String ordTyp) {
        this.ordTyp = ordTyp;
    }

    public Integer getOrdNo() {
        return this.ordNo;
    }

    public void setOrdNo(Integer ordNo) {
        this.ordNo = ordNo;
    }

    public String getIsVisible() {
        return this.isVisible;
    }

    public void setIsVisible(String isVisible) {
        this.isVisible = isVisible;
    }

    public String getIsKey() {
        return this.isKey;
    }

    public void setIsKey(String isKey) {
        this.isKey = isKey;
    }

    public String getIsQuery() {
        return this.isQuery;
    }

    public void setIsQuery(String isQuery) {
        this.isQuery = isQuery;
    }

    public String getIsInput() {
        return this.isInput;
    }

    public void setIsInput(String isInput) {
        this.isInput = isInput;
    }

    public String getIsNeed() {
        return this.isNeed;
    }

    public void setIsNeed(String isNeed) {
        this.isNeed = isNeed;
    }

    public String getIsOrgId() {
        return this.isOrgId;
    }

    public void setIsOrgId(String isOrgId) {
        this.isOrgId = isOrgId;
    }

    public String getListSql() {
        return this.listSql;
    }

    public void setListSql(String listSql) {
        this.listSql = listSql;
    }

    public String getChkRule() {
        return this.chkRule;
    }

    public void setChkRule(String chkRule) {
        this.chkRule = chkRule;
    }

    protected int doHashCode() {
        return getHashCodeBuilder().append(inpCode).append(colCode).toHashCode();
    }

    protected boolean doEquals(Object object) {
        HndInpDefItm other = (HndInpDefItm) object;
        return getEqualsBuilder().append(inpCode, other.inpCode).append(colCode,
                other.colCode).isEquals();
    }

    public int getMaxLength() {
        if (colLen == null || colLen.toString().endsWith(".0")) {
            return colLen.intValue();
        } else {
            return colLen.intValue() + 1;
        }
    }

    public List getListData() {
        return listData;
    }

    public void setListData(List listData) {
        this.listData = listData;
    }

    public Object getOldValue() {
        return oldValue;
    }

    public void setOldValue(Object oldValue) {
        this.oldValue = oldValue;
    }

    public boolean isVisible() {
        return ("1".equals(this.getIsVisible())) ? true : false;
    }

    public boolean isKey() {
        return "1".equals(this.getIsKey()) ? true : false;
    }

    public boolean isQuery() {
        return "1".equals(this.getIsQuery()) ? true : false;
    }

    public boolean isInput() {
        return "1".equals(this.getIsInput()) ? true : false;
    }

    public boolean isOrgId() {
        return "1".equals(this.getIsOrgId()) ? true : false;
    }

    public boolean isNeed() {
        return "1".equals(this.getIsNeed()) ? true : false;
    }

	public String getDftValue() {
		return dftValue;
	}

	public void setDftValue(String dftValue) {
		this.dftValue = dftValue;
	}

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
